package com.moyun.finance.repository;

import com.moyun.finance.entity.Customer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface CustomerRepository extends JpaRepository<Customer,String>, JpaSpecificationExecutor<Customer> {
    List<Customer> findByCompanyId(String companyId);
    List<Customer> findByCompanyIdAndCustomerNameLike(String companyId, String customerName);
    List<Customer> findByCompanyIdAndAllTypeIdAndCustomerType(String companyId, String allTypeId, String customerType);
    List<Customer> findByCompanyIdAndAllTypeId(String companyId, String allTypeId);
}
